<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
 <%@ include file="/common/query.jsp"%>
<%@ include file="/common/det.jsp"%>
<script>
    	var date = getQueryStringByDecode("date");
    	var campus = getQueryStringByDecode("campus");
		var salesGoalsCampusId = getQueryStringByDecode("salesGoalsCampusId");
        $(function(){


            init();

        });
        function init(){
            var setting = {};
            var url ="";
            var p_insert = false;
            var p_del = false;




            var columns = [
                {field:'id',title:'id',hidden:true},
                {field:'salesGoalsCampusId',title:'salesGoalsCampusId',hidden:true,defaultValue:salesGoalsCampusId},
                {field:'date',title:'月份',type:"date",dateType:"month",update:false,insert:false,formatter:function () {
					return date;
                }},
                {field:'campus',title:'校区',update:false,insert:false,formatter:function () {
                    return campus;
                }},


                {field:'adminSystemUserId',title:'销售顾问',update:false,
					dialog:{
                        url:'${base}/common/getGuwens',
                        combobox:{
                            valueField:'id',
                            textField:'name'
                        }
					},
					search:{type:"single"}
				},
                {field:'percent',title:'校区销售额占比',update:false,insert:false,},
                {field:'targetVal',title:'销售目标',defaultValue:0},
                {field:'finishVal',title:'完成金额',update:false,insert:false},
                {field:'完成率',title:'完成率',update:false,insert:false,
					formatter:function (index,row) {
						return (row.finishVal/row.targetVal)*100;
                    }
				}
            ];
            url='/sales/goals/campus/user/manager?search_EQ_salesGoalsCampusId='+salesGoalsCampusId;
            createQuery('body',columns,
				{
				    pager:false,edit:true,searchBar:{hidden:true},xuhao:false,add:true,del:true,heji:false,singleSelect:true,
				 	onClickRow:function (index,row) {
						window.parent.seeSalesGoalsCampusUserDet(row);
                    }
				},url);

        }
</script>
</head>
<body>
	  <div id="body"></div>
</body>
</html>